# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=python-zope-copy
pkgver=4.3
pkgrel=2
pkgdesc="Pluggable object copying mechanism"
arch=('any')
url="https://github.com/zopefoundation/zope.copy"
license=('ZPL')
depends=('python-setuptools' 'python-zope-interface')
checkdepends=('python-zope-testrunner' 'python-zope-testing' 'python-zope-location')
source=("$pkgname-$pkgver.tar.gz::https://github.com/zopefoundation/zope.copy/archive/$pkgver.tar.gz")
sha512sums=('ca9acf3fb65677ee123a4e1f3cd01051330ecde62f22528ff7aef719e0c60936e9a19c260f461e1aa17a280b43389198bbab85f94f52827e9762e60f65560360')

build() {
  cd "$srcdir"/zope.copy-$pkgver
  python setup.py build
}

check() {
  cd "$srcdir"/zope.copy-$pkgver
  PYTHONPATH="$PWD/build/lib:$PYTHONPATH" python -m zope.testrunner --test-path=src || echo "Tests failed"
}

package() {
  cd "$srcdir"/zope.copy-$pkgver
  python setup.py install --root="$pkgdir" --optimize=1
}

# vim:set ts=2 sw=2 et:
